<?php

namespace Apps\Weixin\Services;

use Apps\Weixin\Models\WxRecord;

class WxRecordService extends WxRecord
{
    public function updateValue($sKey, $sVal)
    {
        return $this->insertByFields([
            'skey' => $sKey,
            'sval' => $sVal,
            'dateline' => time()
        ], true);
    }

    public function getValue($sKey)
    {
        return $this->getOneByField('skey', $sKey);
    }
}